package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.AreaPermissionDao;
import com.green.model.manage.AreaPermission;



/**
 * 人员
 * 
 */
@Repository("areaPermissionDao")
public class AreaPermissionDaoImpl extends BaseDaoImpl implements AreaPermissionDao {

	@Override
	public int insertAreaPermission(AreaPermission ct) {
		return insert("com.green.dao.manage.AreaPermissionDao.insertAreaPermission", ct);
	}

	@Override
	public int updateAreaPermission(AreaPermission ct) {
		return update("com.green.dao.manage.AreaPermissionDao.updateAreaPermission", ct);
	}

	@Override
	public int deleteAreaPermission(Map<String, Object> param) {
		return delete("com.green.dao.manage.AreaPermissionDao.deleteAreaPermission", param);
	}

	@Override
	public AreaPermission getAreaPermissionById(String id) {
		return (AreaPermission) super.getSqlSession().selectOne("com.green.dao.manage.AreaPermissionDao.getAreaPermissionById",id);	
		}

	@SuppressWarnings("unchecked")
	@Override
	public List<AreaPermission> getAreaPermissionList(Map<String, Object> param) {
		return (List<AreaPermission>) this.selectList("com.green.dao.manage.AreaPermissionDao.getAreaPermissionList", param);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<AreaPermission> getAreaPersonById(Map<String, Object> param) {
		// TODO Auto-generated method stub
		return (List<AreaPermission>) this.selectList("com.green.dao.manage.AreaPermissionDao.getAreaPersonById", param);
	}
	
	
}
